﻿@using System.Globalization
@model CleverCMS.Cms.Data.Entities.UserProfile

@section TitleContent{
    Edit profile
}
@section HeadContent{
}
<h2>Welcome <b>[@CultureInfo.CurrentCulture.TextInfo.ToTitleCase(WebSecurity.CurrentUserName.ToLower())]</b></h2>

<div class="row-fluid">
    <div class="span12">
        <div class="widget green">
            <div class="widget-title">
                <h4><i class="icon-reorder"></i>Details</h4>
            </div>
            <div class="widget-body form">
                @using (Html.BeginForm("Edit", "Account", FormMethod.Post, new { @class = "cmxform form-horizontal", @id = "signupForm", @novalidate = "novalidate" }))
                {
                    
                    @Html.HiddenFor(x=>x.Login)

                    <div class="control-group ">
                        <label class="control-label">Display name</label>
                        <div class="controls">
                            @Html.TextBoxFor(x=>x.DisplayName, new {@class="span6", @id="displayname", @name="displayname", @value = Model.DisplayName})
                        </div>
                    </div>
                    <div class="control-group ">
                        <label class="control-label">Email</label>
                        <div class="controls">
                            @Html.TextBoxFor(x=>x.Email, new {@class="span6", @id="email", @name="email", @value = Model.Email})
                        </div>
                    </div>
                    <div class="control-group ">
                        <label class="control-label">Current password</label>
                        <div class="controls">
                            @Html.TextBoxFor(x=>x.CurrentPassword, new {@class="span6", @id="password", @name="password", @value = Model.Password, @placeholder = "password?"})
                        </div>
                    </div> 
                    <div class="control-group ">
                        <label class="control-label">New password</label>
                        <div class="controls">
                            @Html.TextBoxFor(x=>x.Password, new {@class="span6", @id="password", @name="password", @value = Model.Password, @placeholder = "new password"})
                        </div>
                    </div>                    
                   
                    <div class="form-actions">
                        <button class="btn btn-success" type="submit">Save</button>
                        <a href="@Url.Action("Default","Home")" class="btn">Cancel</a>
                    </div>
                }
            </div>
        </div>
    </div>
</div>